package com.example.chcrm.entity.employee;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.example.chcrm.entity.common.OperateRecord;
import org.jeecgframework.poi.excel.annotation.Excel;
import javax.validation.constraints.NotBlank;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.util.List;

/**
 * @Author 邹
 * @Date 2025/3/3 14:11
 * @Version 1.0
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class EssEmployee {
    private static final long serialVersionUID = 1L;
    @TableId(value = "id", type = IdType.INPUT)
    private String id;  //主键ID
    @TableField("source")
    @Excel(name = "用户类型", width = 20)
    private String source;  //来源 0平台 1公路供应商 2水路供应商 3司机 4船舶
    @TableField("user_name")
    private String userName;  //用户名
    @TableField("account")
    @Excel(name = "账号", width = 20)
    private String account;     //用户账号
    @TableField("password")
    private String password;    //用户密码
    @TableField("email")
    private String email;       //邮箱
    @TableField("emp_name")
    @Excel(name = "姓名", width = 20)
    private String empNm;       //员工姓名
    @TableField("emp_gender")
    private String empGender;   //性别   0:男 1：女
    @TableField("emp_age")
    private String age;         //年龄
    @TableField("is_deleted")
    private String isDeleted;  //是否删除 0：否1:是
    @TableField("status")
    @Excel(name = "状态", width = 10)
    private int status;    //是否启用 0：禁用 1：启用 2：待审核
    @TableField("create_time")
    private String createTime;  //创建时间

    @TableField(exist = false)
    private Integer page = 1;
    @TableField(exist = false)
    private Integer rows = 10;


    @TableField(exist = false)
    @NotBlank(message = "所属部门不能为空")
    private String depId;       //部门id
    @TableField(exist = false)
    @Excel(name = "部门", width = 20)
    private String depNm;       //部门
    @TableField(exist = false)
    @NotBlank(message = "所属角色不能为空")
    private String roleId;      //角色id
    @TableField(exist = false)
    @Excel(name = "所属角色", width = 20)
    private String roleNm;      //角色
    @TableField(exist = false)
    private List<EssEmployeePort> employeePorts;   //服务港口

    @TableField(exist = false)
    private List<OperateRecord> operateRecordList;  //操作记录
    @TableField(exist = false)
    String oldPwd ;
    @TableField(exist = false)
    String newPwd ;
}
